import * as sqlite3 from "sqlite3";

export interface DBService{
    test: (data: string) => string
}

export class SQLiteDBService implements DBService {
    DB_NAME:string = "./data/data.db";
    db:sqlite3.Database;

    constructor() {
        this.db = new sqlite3.Database(this.DB_NAME, (err => {
            console.log("error:", err);
        }));
    }

    test(data: string): string {
        return  "666";

    }

    async __dbInit(){
        return new Promise<string>((resolve, rejected)=>{
             resolve("hahaha");
        });
    }

}